//
//  DetailCell.m
//  NEWS
//
//  Created by lanou on 16/4/8.
//  Copyright © 2016年 孙金龙. All rights reserved.
//

#import "DetailCell.h"
#import <UIImageView+WebCache.h>
#define KWidth [UIScreen mainScreen].bounds.size.width
#define KHeight  [UIScreen mainScreen].bounds.size.height
@interface  DetailCell ();
@property (weak, nonatomic) IBOutlet UIImageView *imageview;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *commentLabel;

@end



@implementation DetailCell


- (void)setModel:(TableViewModel *)model
{
    _commentLabel.frame = CGRectMake(KWidth-80, self.frame.size.height-35, 100, 30);
    _titleLabel.frame = CGRectMake(108, 10, KWidth-120, 60);
    
    _titleLabel.numberOfLines = 0;
    [_imageview sd_setImageWithURL:[NSURL URLWithString:model.thumbnail]];
    _titleLabel.text = model.title;
    _commentLabel.text = [NSString stringWithFormat:@"评论: %@",model.commentCount];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
